package junit.com.cpi.cornpp.creditlinebalance.dao;

import com.cpi.cornpp.creditlinebalance.dao.CreditLineBalanceDAO;
import com.cpi.cornpp.creditlinebalance.exception.CreditLineBalanceException;

import junit.framework.TestCase;

public class CreditLineBalanceDAOTest extends TestCase {

	public CreditLineBalanceDAOTest(String name) {
		super(name);
	}

	protected void setUp() throws Exception {
		super.setUp();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}

	public void testList() {
		CreditLineBalanceDAO creditLineBalanceDAO = new CreditLineBalanceDAO();
		try {
			creditLineBalanceDAO.list(1, 3, 10);
		} catch (CreditLineBalanceException e) {
			e.printStackTrace();
		}
	}
	public void testInsert() {
		CreditLineBalanceDAO creditLineBalanceDAO = new CreditLineBalanceDAO();
		try {
			creditLineBalanceDAO.insert(1, 12, 800);
		} catch (CreditLineBalanceException e) {
			e.printStackTrace();
			fail(e.getExceptionCode());
		}
	}
	public void testUpdate() {
		CreditLineBalanceDAO creditLineBalanceDAO = new CreditLineBalanceDAO();
		try {
			creditLineBalanceDAO.update(1, 7, 800);
		} catch (CreditLineBalanceException e) {
			e.printStackTrace();
			fail(e.getExceptionCode());
		}
	}
}
